import requests

headers = {
    'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36',
}


def get_info():
    url = 'https://api.inews.qq.com/newsqa/v1/query/inner/publish/modules/list?modules=statisGradeCityDetail,diseaseh5Shelf'

    response = requests.post(url=url, headers=headers).json()  # 使用get来获取网页数据
    res_data = response['data']
    return res_data


def get_data():
    url = 'https://api.inews.qq.com/newsqa/v1/query/inner/publish/modules/list'
    data = {
        'modules': 'chinaDayList,chinaDayAddList,cityStatis,nowConfirmStatis,provinceCompare'
    }
    response = requests.post(url=url, headers=headers, data=data).json()  # 使用get来获取网页数据
    res_data = response['data']
    return res_data


if __name__ == '__main__':
    # get_info()
    get_data()
